﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_nhom_quyen.ascx.cs" Inherits="Admin_Module_quan_tri_nhom_quyen" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Panel runat="server" ID="panel1" Visible="false" BorderColor="Brown" BorderStyle="Solid" BorderWidth="1" >
    <asp:Label runat="server" ID="lblMessage"></asp:Label>
    <span style="font-size:14px; font-weight:bold; padding-left:15px;">Phân quyền cho nhóm quyền </span><b><asp:Label runat="server" ID="lblRoleID"></asp:Label></b>
    <table>
        <tr>
            <td>Tên nhóm: </td><td><asp:TextBox runat="server" ID="txtRoleName"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Mô tả: </td><td><asp:TextBox runat="server" ID="txtRoleDescription"></asp:TextBox></td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:CheckBoxList runat="server" ID="chkAdminPageList" RepeatColumns="5" CellPadding="5" TextAlign="Right" DataTextField="FunctionPageName" DataValueField="FunctionPageID">
                </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                    <asp:Button runat="server" ID="btnSetRole" OnClick="btnSetRole_Click" Text="Thêm mới" />
            </td>
        </tr>
    </table>
</asp:Panel>


<div>
    <asp:ImageButton runat="server" ID="btnAddRole" onclick="btnAddRole_Click" ImageUrl="/Image/add2.png" />Thêm mới
    <telerik:RadGrid ID="grd" AllowPaging="true" PageSize="20" runat="server" Skin="WebBlue" GridLines="Horizontal"  
        AllowFilteringByColumn="True" AutoGenerateColumns="false" 
        onpageindexchanged="grd_PageIndexChanged">
        <MasterTableView NoDetailRecordsText="Không Có Dữ Liệu">
            <Columns>
                <telerik:GridTemplateColumn HeaderText="Tài Khoản" DataField="UserName">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="btnEditRole" OnClick="btnEditRole_Click" CommandArgument=' <%# Eval("RoleID")%>' Text=' <%# Eval("RoleName")%>'></asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderText="Mô tả" DataField="Description" AllowFiltering="true"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:LinkButton Text="Xóa" runat="server" ID="btnDeleteRole" CommandArgument='<%# Eval("RoleID") %>' OnClick="btnDeleteRole_Click" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</div>